<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>公务员招考</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
    <script src="../../js/statistics.js"></script>
    <style>
        body{
            padding:0;
            margin:0;
            width:100%;
            height:100%;
            background: #fff;
        }
        .mui-table-view:after{
            height:0;
        }
        .mui-table-view-cell:after{
            height:0;
        }
        .header{
            background: #43ac45;
        }
        body{
            min-height:100vh;
            background: #f4f4f4;
        }
        .header h1{
            color:#fff;
            font-size:18px;
        }
        .header a{
            color:#fff;
        }
        .mui-table-view-chevron .mui-table-view-cell {
            padding-right: 5%;
        }
        li div{
            font-size:15px;
            margin-bottom:2%;
            color: #333;
        }
        li p{
            color:#999;
            font-size:13px;
        }
        ul li:nth-of-type(even){
            background: #f4f4f4;
        }
        .mui-table-view{
            margin-top:-5px;
        }
        .main img{
            width:100%;
        }
        .main{
            padding-top:44px;
        }
    </style>
</head>
<body>
<header class="mui-bar mui-bar-nav header">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">公务员招考</h1>
</header>
<div class='main'>
    <img src="../../images/icon/executive_housekeeper/GWY.jpg" alt="">
    <ul class="mui-table-view mui-table-view-chevron" id='load_list'>
        <!--新闻列表-->

        <!--<li class="mui-table-view-cell"  id="c1">
            <div class="list_right" id="civil">
                2017年常州市公务员招录公告
            </div>
            <p class="clear" style='text-align:right'>
                2017-01-10
            </p>
        </li>-->
    </ul>

</div>



<!--<script src='../../plugins/template/template.js'></script>-->
<script src='../../plugins/jquery/jquery-3.1.0.min.js'></script>
<script src="../../plugins/mui/mui.min.js"></script>
<script src="../../js/fontset.js"></script>
<script src="../../js/md5.js"></script>
<script src="../../js/getApiToken.js" type="text/javascript" charset="utf-8"></script>
<!--<script type="text/javascript" src="../../js/judge.js" ></script>-->
<!--<script id="item" type="text/html">
    {{each data as value i}}
        <li class="mui-table-view-cell"  id="{{value.id}}">
            <div class="list_right">
                {{value.title}}
            </div>
            <p class="clear" style='text-align:right'>
                {{value.create_time}}
            </p>
        </li>
    {{/each}}
</script>-->
<script>
    mui.init();
    mui.plusReady(function(){
    	//列表交互
	   	myAjax(
            'home/recruit/getCivil','get',{},
            function(data){
                console.log(JSON.stringify(data));
                if(data.success){
                  	for(var i in data){
                  		if(data[i]!=true){
                  			var html='';
                  			html+=
                  			'<li class="mui-table-view-cell"  id="'+data[i].id+'">'+
					            '<div class="list_right">'+data[i].title+'</div>'+
					            '<p class="clear" style="text-align:right">'+data[i].time+'</p>'+
					        '</li>';
						    $("#load_list").append(html);
                  		}	
                  	}	
                }
                //背景色
			    var bg=$('li:last-child').css('background-color');
			    console.log($('body').css('background-color'))
			    if($('body').css('background-color')==bg){
			        if($('body').css('background-color')=='rgb(244, 244, 244)'){
			            $('body').css('background-color','#fff');
			        }else{
			            $('body').css('background-color','#f4f4f4');
			        }
			    }
            }
      	);
    	//页面跳转链接
	    mui('ul').on('tap','li',function(e){
	        var href=$(this).find("div").attr("id");
	        var detail_id=$(this).attr('id');
	        console.log(detail_id);
	        mui.openWindow({
	            url:'civil_detail.html',//'河东黄页页面链接'
	            id:'civil_detail',
	            extras:{
	                "detail_id":detail_id,
	            },
	            show:{
	                autoShow:true,//页面loaded事件发生后自动显示，默认为true
	            },
	            waiting:{
	                autoShow:true,//自动显示等待框，默认为true
	                title:'加载中...',//等待对话框上显示的提示内容
	            }
	        })
	    });
	    
    })

</script>
</body>
</html>